﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Shopping.Common;
using Shopping.Model;
using Shopping.BLL;

public partial class News_Show : System.Web.UI.Page
{
    protected List<CategoryMenu> categories; //商品类别信息；
    protected URLManage bllUrl = new URLManage();
    protected NewsInfo newsInfo;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            int newsId = Utility.G<int>("NewsID");
            NewsManage bllNews = new NewsManage();
            bllNews.UpdateClicks(newsId);
            newsInfo = bllNews.GetNews(newsId);
            if (newsInfo.news.JumpUrl != "http://")
            {
                Response.Redirect(newsInfo.news.JumpUrl);
                Response.End();
            }
            CategoriesManage bllCategory = new CategoriesManage();
            categories = bllCategory.GetCategoryMenu(); //加载商品分类信息；

        }
    }
}